/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Services;

import Entity.AccountDB;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;

/**
 *
 * @author Istc
 */
@WebService(serviceName = "BankService")
public class BankService {

    /**
     * This is a sample web service operation
     */
    @WebMethod(operationName = "hello")
    public String hello(@WebParam(name = "name") String txt) {
        return "Hello " + txt + " !";
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "checkAccount")
    public boolean checkAccount(@WebParam(name = "CardNumber") int CardNumber) {
        AccountDB accDB=new AccountDB();
        
        return accDB.checkAcc(CardNumber);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "transfer")
    public boolean transfer(@WebParam(name = "FirstAccount") int FirstAccount, @WebParam(name = "ToAccount") int ToAccount, @WebParam(name = "Cvv") int Cvv, @WebParam(name = "Amount") float Amount) {
        AccountDB accDB=new AccountDB();
        return accDB.transfer(FirstAccount, Cvv, ToAccount, Amount);
    }
}
